package svc

import (
	"transaction/api/internal/config"
	"transaction/tranrpc/tranrpcclient"

	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config config.Config
	//TranRpc tranrpcclient.Tranrpc
	TranRpc tranrpcclient.Tranrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,
		//TranRpc: tranrpcclient.NewTranrpc(zrpc.MustNewClient(c.TranRpc)),
		//TranRpc: tranrpcclient.NewTranrpc(zrpc.MustNewClient(c.TranRpc)),
		TranRpc: tranrpcclient.NewTranrpc(zrpc.MustNewClient(c.TranRpc)),
	}
}
